package com.example.taco_cloud.taco.controller;

import com.example.taco_cloud.taco.entity.User;
import com.example.taco_cloud.taco.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {

    @Autowired
    private UserService userService;

    @RequestMapping("user/{id}")
    public User getUser(@PathVariable int id) {
        return userService.queryUserOne(id);
    }
}
